//
//  Dock.h
//  新浪微博
//
//  Created by apple on 13-10-27.
//  Copyright (c) 2013年 itcast. All rights reserved.
//  底部的工具条（选项卡条）

#import <UIKit/UIKit.h>

@class Dock;


@protocol DockDelegate <NSObject>
@optional
- (void)dock:(Dock *)dock didSelectIndexFrom:(NSInteger)from to:(NSInteger)to;
- (void)dock:(Dock *)dock didSelectItemFrom:(UIButton*)from to:(UIButton*)to;
- (void)dock:(Dock *)dock didPressedIndex:(NSInteger)index;
- (void)dock:(Dock *)dock didPressedItem:(UIButton*)item;
@end

@interface Dock : UIView

// 添加一个选项卡


- (void)addDockItemWithTitle:(NSString *)title titleColorForNormal:(UIColor*)titleColorForNormal titleColorForSelected:(UIColor*)titleColorForSelected iconForNormal:(NSString*)iconForNormal iconForSelected:(NSString *)iconForSelected;

- (void)addDockItemWithTitle:(NSString *)title titleColorForNormal:(UIColor*)titleColorForNormal titleColorForHighlighted:(UIColor*)titleColorForHighlighted iconForNormal:(NSString*)iconForNormal iconForHighlighted:(NSString *)iconForHighlighted;


- (void)addDockItemWithTitle:(NSString *)title titleColorForNormal:(UIColor*)titleColorForNormal titleColorForHighlighted:(UIColor*)titleColorForHighlighted titleColorForSelected:(UIColor*)titleColorForSelected iconForNormal:(NSString*)iconForNormal iconForHighlighted:(NSString *)iconForHighlighted iconForSelected:(NSString *)iconForSelected;

- (void)addDockItemWithTitle:(NSString *)title titleColorForNormal:(UIColor*)titleColorForNormal titleColorForHighlighted:(UIColor*)titleColorForHighlighted titleColorForSelected:(UIColor*)titleColorForSelected titleColorForDisabled:(UIColor*)titleColorForDisabled iconForNormal:(NSString*)iconForNormal iconForHighlighted:(NSString *)iconForHighlighted iconForSelected:(NSString *)iconForSelected iconForDisabled:(NSString*)iconForDisabled;

- (void)addItem:(UIButton*)item;

// 代理
@property (nonatomic, weak) id<DockDelegate> delegate;

@property (nonatomic) NSInteger selectedIndex;
@property (nonatomic) UIButton* selectedItem;


@property (nonatomic,readonly) NSArray* items;

@property (nonatomic)BOOL itemSelectable;

@end